import request from "@/utils/request"

// 获取定制鞋列表
const findAllCustomShoes = () => {
    return request({
        url: "/api/customShoe/all",
        method: "get"
    })
}

// 根据ID获取定制鞋详情
const findCustomShoeById = (id) => {
    return request({
        url: `/api/customShoe/find/${id}`,
        method: "get"
    })
}

// 保存定制鞋（新增/编辑）
const saveCustomShoe = (data) => {
    return request({
        url: "/api/customShoe/save",
        method: "post",
        headers: { "Content-Type": "application/json;charset=utf-8" },
        data
    })
}

// 根据ID删除定制鞋
const deleteCustomShoeById = (id) => {
    return request({
        url: `/api/customShoe/delete/${id}`,
        method: "get"
    })
}

export { findAllCustomShoes, findCustomShoeById, saveCustomShoe, deleteCustomShoeById }